import request from '@/utils/request'
// 登录
export function login(data) {
  return request({
    url: '/auth/local',
    method: 'post',
    data
  })
}
// 获取用户基本资料
export function getUserInfo() {
  return request({
    url: '/users/me',
    method: 'get'
  })
}
// 注册
export function register(data) {
  return request({
    url: '/auth/local/register',
    method: 'post',
    data
  })
}

// 获取当前用户权限
export function getUserPermissions() {
  return request.get('/mypermissions')
}

